package com.zyh.homework.test4.domain;

public class Teacher extends Person {
    private String content;

    //    构造方法
    public Teacher() {
    }

    public Teacher(String name, int age, String content) {
        super(name, age);
        this.content = content;
    }

    //    行为


    @Override
    public void eat() {
        System.out.println("年龄为"+getAge()+"的"+getName()+"老师正在吃饭....");
    }

    public void teach() {
        System.out.println("年龄为" + getAge() + "的" + getName() + "老师正在亢奋的讲着" + content + ".......");
    }

    //    getter and setter

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
